ECE 563 Assignment 5

Images and m-files for this assignment may be downloaded from impro5.zip and MacbethColor.zip.

Read Section 11.4 (p 842-852) on principal components. See also the routine princomp.m from DIPUM.

  1. Select a color photograph with bright colors.
    1. Find its principal component transformation. Show the resulting transformed images (scaled), their eigenvalues, and eigenvectors.
    2. Use the co-occurance histogram method in cohist.m from the handout for the pairs (RG, RB, and GB) for your color photograph.

  2. Run rgbcube.m. Rotate the cube to center the body diagonal with the red-green-blue primary faces showing, and capture a screen shot. Why are the interior edges of the cube so obvious?

  3. For the three images in MacbethColor.zip and your own image,
    1. Find the mean RGB values for each of the 24 squares.
    2. Find the mean and rms of the grayscale squares (19-24) in the bottom row of the four Macbeth color images. Plot the mean value vs. Y using values from MacbethGray.xls. Find the best-fitting power-law exponent for each image.

  4. Plot your measured RGB values for the Macbeth chart images with the "true" values in the speadsheet. Find a linear transformation (RGB_corrected = C * (RGB_uncorrected) to perform a color correction. Calculate the rms difference for the color squares before and after correction. Note that there are two images of the Macbeth chart, one with a digital camera and one with a scanner. Which device had better color correction?

  5. Find an equation for the perimeter of the binary polygon images generated in assignment 3. Measure the perimeter length using bwperim. Compare the results to the theoretical values for the perimeter.

  6. Correct the spatial variations in the image uneven.tif by fitting z = a0 + a1 x + a2 y + a3 rsq where x is a x-ramp image (0-1), y is a y-ramp image (0-1), and rsq is a quadratic ramp rsq = x.*x+y.*y. Determine the coefficients, subtract the fitted image from the test image, display the scaled difference image, and calculate the rms residual difference.

    Reference: Bernd Jahne, Digital Image Processing, 4th Ed., Springer, 1997. p. 229.

  7. Repeat the fit described above on the image c_backgr.tif. Divide the fitted image point-by-point into the image c_inhomo.tif. Threshold the resulting image to allow bwlabel to count the number of dark and light dust particles.

    Reference: Bernd Jahne, Digital Image Processing, 4th Ed., Springer, 1997. p. 236.


Maintained by John Loomis, last updated 29 Feb 2016